import 'package:json_annotation/json_annotation.dart';
part 'EcyGoodsSkuModel.g.dart';

@JsonSerializable()
class EcyGoodsSkuModel {
  String? description;
  String? name;
  String? id;
  String? imageUrl;
  double? marketPrice;
  double? salePrice;
  double? stockQuantity;
  String? status;
  String? skuCode;
  String? skuName;
  String? remark;
  double? selectNum;
  String? commodityName;
  double? saleCount;
  String? skuId;
  double? salePriceMin; // 销售价格最小值
  double? salePriceMax; // 销售价格最大值
  double? marketPriceMin; // 市场价格最小值
  double? marketPriceMax; // 市场价格最大值

  EcyGoodsSkuModel(
      this.description,
      this.name,
      this.id,
      this.imageUrl,
      this.marketPrice,
      this.salePrice,
      this.stockQuantity,
      this.skuCode,
      this.skuName,
      this.status,
      this.remark,
      this.selectNum,
      this.commodityName,
      this.saleCount,
      this.skuId,
      this.salePriceMin,
      this.salePriceMax,
      this.marketPriceMin,
      this.marketPriceMax,
    );

  // 从JSON创建User实例的工厂方法
  factory EcyGoodsSkuModel.fromJson(Map<String, dynamic> json) =>
      _$EcyGoodsSkuModelFromJson(json);

  // 将User实例转换为JSON的方法
  Map<String, dynamic> toJson() => _$EcyGoodsSkuModelToJson(this);
}
